# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=sushi
pkgver=3.24.0
pkgrel=1
pkgdesc="A quick previewer for Nautilus"
arch=(i686 x86_64)
url="https://git.gnome.org/browse/sushi"
license=(GPL2)
groups=(gnome)
depends=(clutter-gtk clutter-gst gjs libmusicbrainz5 webkit2gtk gtksourceview3 evince)
optdepends=('unoconv: OpenDocument formats')
makedepends=(intltool gobject-introspection gnome-common git)
_commit=bc9466ffc78ecfa61d704821fa90a8b45ea66c15  # tags/3.24.0^0
source=("git+https://git.gnome.org/browse/sushi#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname

  ./configure --prefix=/usr --libexecdir=/usr/lib/$pkgname

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
